﻿package chapter_07_Homework;

import java.util.Scanner;

/*
 * 		使用数组计算平均分。
 */
public class Work_01 {
	public static void main(String[] args) {
		int[] scores = new int[5];
		int sum = 0;
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入5位同学的成绩：");
		for (int i = 0; i < scores.length; i++) {
			scores[i] = sc.nextInt();;
			sum +=scores[i];
		}
		System.out.println("学员的平均分是："+(double)(sum/5)+"分");
	}
}
